
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>mysql设计 · tgor note</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="tgor">
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-page-toc-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search-pro/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-back-to-top-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="Mysql事务与锁.html" />
    
    
    <link rel="prev" href="../category/数据库.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    Me
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../category/微服务.html">
            
                <a href="../category/微服务.html">
            
                    
                    微服务
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../Java-Spring/Feign.html">
            
                <a href="../Java-Spring/Feign.html">
            
                    
                    HTTP客户端Feign
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../Java-其他库/限流.html">
            
                <a href="../Java-其他库/限流.html">
            
                    
                    限流
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="../运维/Nginx限流.html">
            
                <a href="../运维/Nginx限流.html">
            
                    
                    限流Nginx
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="../Java-Spring/负载均衡.html">
            
                <a href="../Java-Spring/负载均衡.html">
            
                    
                    负载均衡
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.5" data-path="../运维/Nginx负载均衡.html">
            
                <a href="../运维/Nginx负载均衡.html">
            
                    
                    负载均衡Nginx
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.6" data-path="../Java-其他库/熔断Hystrix.html">
            
                <a href="../Java-其他库/熔断Hystrix.html">
            
                    
                    熔断Hystrix
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.7" data-path="../Java-其他库/缓存.html">
            
                <a href="../Java-其他库/缓存.html">
            
                    
                    缓存
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.8" data-path="../Java-其他库/缓存.html">
            
                <a href="../Java-其他库/缓存.html#本地缓存">
            
                    
                    本地缓存
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.9" data-path="../Redis/Redis.html">
            
                <a href="../Redis/Redis.html">
            
                    
                    分布式缓存Redis
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.10" data-path="../Java-其他库/分布式事务.html">
            
                <a href="../Java-其他库/分布式事务.html">
            
                    
                    分布式事务
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.11" data-path="../Java-其他库/分布式事务.html">
            
                <a href="../Java-其他库/分布式事务.html#事务消息">
            
                    
                    可靠事务消息
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.12" data-path="../Java-Spring/业务监控.html">
            
                <a href="../Java-Spring/业务监控.html">
            
                    
                    业务监控
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.13" data-path="../Java-其他库/分布式定时作业.html">
            
                <a href="../Java-其他库/分布式定时作业.html">
            
                    
                    分布式作业调度ElasticJob
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.14" data-path="../Java-ORM/ORM.html">
            
                <a href="../Java-ORM/ORM.html">
            
                    
                    ORM
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.15" data-path="../Java-其他库/分布式系统及CAP原理.html">
            
                <a href="../Java-其他库/分布式系统及CAP原理.html">
            
                    
                    分布式系统及CAP原理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.16" data-path="../MQ/RabbitMQ笔记.html">
            
                <a href="../MQ/RabbitMQ笔记.html">
            
                    
                    消息驱动Rabbitmq
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../category/数据库.html">
            
                <a href="../category/数据库.html">
            
                    
                    数据库
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="1.3.1" data-path="经典数据库设计案例.html">
            
                <a href="经典数据库设计案例.html">
            
                    
                    mysql设计
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="Mysql事务与锁.html">
            
                <a href="Mysql事务与锁.html">
            
                    
                    mysql事务与锁
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="mysql数据类型.html">
            
                <a href="mysql数据类型.html">
            
                    
                    mysql数据类型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="mysql索引及查询.html">
            
                <a href="mysql索引及查询.html">
            
                    
                    mysql索引与查询
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.5" data-path="mysql索引及查询.html">
            
                <a href="mysql索引及查询.html#查询语句设计准则">
            
                    
                    mysql查询语句设计准则
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.6" data-path="mysql性能测试.html">
            
                <a href="mysql性能测试.html">
            
                    
                    mysql性能测试
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.7" data-path="mysql主从同步与读写分离.html">
            
                <a href="mysql主从同步与读写分离.html">
            
                    
                    mysql主从同步与读写分离
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.8" data-path="../Java-Spring/SpringBoot事务注解@Transactional.html">
            
                <a href="../Java-Spring/SpringBoot事务注解@Transactional.html">
            
                    
                    Spring事务注解@Transactional
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.9" data-path="../数据结构与算法/位运算应用实例.html">
            
                <a href="../数据结构与算法/位运算应用实例.html">
            
                    
                    位运算应用实例
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.10" data-path="../Mongodb-Client/morphia-API汇总.html">
            
                <a href="../Mongodb-Client/morphia-API汇总.html">
            
                    
                    morphia API汇总
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.11" data-path="../Mongodb-Client/mongo驱动连接.html">
            
                <a href="../Mongodb-Client/mongo驱动连接.html">
            
                    
                    mongodb驱动与连接
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.12" data-path="../Mongodb/mongodb-ObjectId实践.html">
            
                <a href="../Mongodb/mongodb-ObjectId实践.html">
            
                    
                    mongodb ObjectId实践
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.13" data-path="../Mongodb/mongodb角色权限.html">
            
                <a href="../Mongodb/mongodb角色权限.html">
            
                    
                    mongodb角色权限
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../category/java并发.html">
            
                <a href="../category/java并发.html">
            
                    
                    Java并发
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../Java-Base/Java并发.html">
            
                <a href="../Java-Base/Java并发.html">
            
                    
                    Java并发
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../Java-Base/Java并发.html">
            
                <a href="../Java-Base/Java并发.html#锁">
            
                    
                    Java并发之锁设计
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="../Java-Base/Java并发.html">
            
                <a href="../Java-Base/Java并发.html#synchronized">
            
                    
                    Java并发之synchronized
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="../Java-Base/Java之Lock.html">
            
                <a href="../Java-Base/Java之Lock.html#reentrantlock">
            
                    
                    Java Lock之ReentrantLock
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="../Java-Base/Java之Lock.html">
            
                <a href="../Java-Base/Java之Lock.html#reentrantreadwritelock">
            
                    
                    Java Lock之ReentrantReadWriteLock
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.6" data-path="../Java-Base/Java之Future.html">
            
                <a href="../Java-Base/Java之Future.html">
            
                    
                    Java Future
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.7" data-path="../Java-Base/Java之Future.html">
            
                <a href="../Java-Base/Java之Future.html#futuretask">
            
                    
                    Java Future之FutureTask
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.8" data-path="../Java-Base/Java之Future.html">
            
                <a href="../Java-Base/Java之Future.html#completablefuture">
            
                    
                    Java Future之CompletableFuture
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.9" data-path="../Java-Base/Java之Future.html">
            
                <a href="../Java-Base/Java之Future.html#forkjointask">
            
                    
                    Java Future之ForkJoinTask
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.10" data-path="../Java-Base/Java之Thread.html">
            
                <a href="../Java-Base/Java之Thread.html">
            
                    
                    Java Thread
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../category/redis.html">
            
                <a href="../category/redis.html">
            
                    
                    Redis
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="../Redis/Redis.html">
            
                <a href="../Redis/Redis.html">
            
                    
                    Redis
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="../Redis/Redis.html">
            
                <a href="../Redis/Redis.html#集群">
            
                    
                    Redis集群
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="../Redis/Redis.html">
            
                <a href="../Redis/Redis.html#消息订阅">
            
                    
                    Redis消息订阅
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4" data-path="../Redis/Redis.html">
            
                <a href="../Redis/Redis.html#lua">
            
                    
                    Redis Lua脚本
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5" data-path="../Redis/Redis.html">
            
                <a href="../Redis/Redis.html#配置汇总">
            
                    
                    Redis配置汇总
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../category/运维.html">
            
                <a href="../category/运维.html">
            
                    
                    运维
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../运维/Linux常用操作汇总.html">
            
                <a href="../运维/Linux常用操作汇总.html">
            
                    
                    Linux常用操作汇总
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="../运维/阿里云笔记.html">
            
                <a href="../运维/阿里云笔记.html">
            
                    
                    阿里云笔记
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../category/nginx.html">
            
                <a href="../category/nginx.html">
            
                    
                    Nginx
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="../运维/Nginx学习笔记.html">
            
                <a href="../运维/Nginx学习笔记.html">
            
                    
                    Nginx基础
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="../运维/Nginx负载均衡.html">
            
                <a href="../运维/Nginx负载均衡.html">
            
                    
                    Nginx负载均衡
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="../运维/Nginx限流.html">
            
                <a href="../运维/Nginx限流.html">
            
                    
                    Nginx限流
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.4" data-path="../运维/Nginx学习笔记.html">
            
                <a href="../运维/Nginx学习笔记.html#六、其他">
            
                    
                    Nginx客户端辅助技巧
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="../category/容器化.html">
            
                <a href="../category/容器化.html">
            
                    
                    容器化
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.1" data-path="../Docker/docker笔记.html">
            
                <a href="../Docker/docker笔记.html">
            
                    
                    Docker学习笔记
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.2" data-path="../Docker/docker笔记.html">
            
                <a href="../Docker/docker笔记.html#基础操作">
            
                    
                    Docker基础操作
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3" data-path="../Docker/docker笔记.html">
            
                <a href="../Docker/docker笔记.html#dockerfile">
            
                    
                    DockerFile
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="../category/Web.html">
            
                <a href="../category/Web.html">
            
                    
                    Web
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.9.1" data-path="../运维/Http入坑Https笔记.html">
            
                <a href="../运维/Http入坑Https笔记.html">
            
                    
                    Http入坑Https笔记
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.2" data-path="../Web/阿里云OSS.html">
            
                <a href="../Web/阿里云OSS.html">
            
                    
                    OSS
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="../category/java基础.html">
            
                <a href="../category/java基础.html">
            
                    
                    Java基础
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.10.1" data-path="../Java-Base/Java基础.html">
            
                <a href="../Java-Base/Java基础.html#jvm">
            
                    
                    JVM基础
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.2" data-path="../Java-Base/Java基础.html">
            
                <a href="../Java-Base/Java基础.html#语法糖">
            
                    
                    Java语法糖
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.3" data-path="../Java-Base/Java基础.html">
            
                <a href="../Java-Base/Java基础.html#数据结构">
            
                    
                    Java数据结构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.4" data-path="../Java-Base/Java8函数式编程.html">
            
                <a href="../Java-Base/Java8函数式编程.html">
            
                    
                    java8函数式编程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.5" data-path="../Java-Base/ArrayList源码分析.html">
            
                <a href="../Java-Base/ArrayList源码分析.html">
            
                    
                    JDK源码分析ArrayList
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.6" data-path="../Java-Base/HashMap源码分析.html">
            
                <a href="../Java-Base/HashMap源码分析.html">
            
                    
                    JDK源码分析HashMap
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.7" data-path="../Java-Base/Java注解.html">
            
                <a href="../Java-Base/Java注解.html">
            
                    
                    Java注解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.8" data-path="../Java-Base/Timsort排序算法.html">
            
                <a href="../Java-Base/Timsort排序算法.html">
            
                    
                    Timsort排序算法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.9" data-path="../Java-Base/插入排序分析与Java实现.html">
            
                <a href="../Java-Base/插入排序分析与Java实现.html">
            
                    
                    插入排序分析与Java实现
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.11" data-path="../category/工具与规范.html">
            
                <a href="../category/工具与规范.html">
            
                    
                    工具与规范
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.11.1" data-path="../工具/Maven使用技巧汇总.html">
            
                <a href="../工具/Maven使用技巧汇总.html">
            
                    
                    Maven使用技巧
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.2" data-path="../编码规范/Java编码规范.html">
            
                <a href="../编码规范/Java编码规范.html">
            
                    
                    Java编码规范
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.12" data-path="../category/OLAP.html">
            
                <a href="../category/OLAP.html">
            
                    
                    OLAP
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.12.1" data-path="../数据处理/storm学习笔记.html">
            
                <a href="../数据处理/storm学习笔记.html">
            
                    
                    流式计算Storm学习笔记
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.13" data-path="../category/数据运营.html">
            
                <a href="../category/数据运营.html">
            
                    
                    数据运营
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.13.1" data-path="../数据运营/增长黑客数据运营.html">
            
                <a href="../数据运营/增长黑客数据运营.html">
            
                    
                    增长黑客-数据运营
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.14" data-path="../category/前端技术栈.html">
            
                <a href="../category/前端技术栈.html">
            
                    
                    前端技术栈
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.14.1" data-path="../前端/JavaScript设计模式.html">
            
                <a href="../前端/JavaScript设计模式.html">
            
                    
                    JavaScript设计模式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.14.2" data-path="../前端/html相对路径与绝对路径.html">
            
                <a href="../前端/html相对路径与绝对路径.html">
            
                    
                    Html相对路径与绝对路径
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.14.3" data-path="../前端/微信小程序学习笔记.html">
            
                <a href="../前端/微信小程序学习笔记.html">
            
                    
                    微信小程序学习笔记
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.15" data-path="../category/个人.html">
            
                <a href="../category/个人.html">
            
                    
                    个人
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.15.1" data-path="../个人/简历.html">
            
                <a href="../个人/简历.html">
            
                    
                    简历
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >mysql设计</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="mysql&#x8BBE;&#x8BA1;">mysql&#x8BBE;&#x8BA1;</h1>
<p><a href="http://naotu.baidu.com/file/75bdbe30a8cf43aa0019a0b6967b1e56?token=b68fc78b0ca1d4e5" target="_blank">mysql&#x8BBE;&#x8BA1;&#x8111;&#x56FE;</a></p>
<h1 id="&#x8BBE;&#x8BA1;&#x539F;&#x5219;">&#x8BBE;&#x8BA1;&#x539F;&#x5219;</h1>
<ol>
<li>OLTP&#x5E94;&#x7528;&#x4E0D;&#x80FD;&#x51FA;&#x73B0;&#x805A;&#x5408;&#x7EDF;&#x8BA1;&#x7684;&#x573A;&#x666F;&#xFF1B;</li>
<li>&#x3010;&#x5B58;&#x5728;&#x66F4;&#x65B0;&#xFF0C;&#x4E0D;&#x5B58;&#x5728;&#x63D2;&#x5165;&#x3011;&#x573A;&#x666F;&#x7684;<code>saveOrUpdate</code>&#x64CD;&#x4F5C;&#xFF0C;&#x4E0D;&#x80FD;&#x4E0A;&#x9501;&#x884C;&#x8BB0;&#x5F55;&#xFF0C;&#x5426;&#x5219;&#x4F1A;&#x51FA;&#x73B0;&#x6B7B;&#x9501;&#x95EE;&#x9898;&#xFF1B;&#x4E0D;&#x63A8;&#x8350;&#x4F7F;&#x7528;replace&#x65B9;&#x6CD5;&#xFF1B;&#x5B58;&#x5728;&#x67E5;&#x8BE2;&#x6761;&#x4EF6;&#x5982;&#x80FD;&#x547D;&#x4E2D;&#x552F;&#x4E00;&#x7D22;&#x5F15;&#xFF0C;&#x5EFA;&#x8BAE;&#x4F7F;&#x7528;<code>insert into table ON DUPLICATE KEY UPDATE column = condition</code>&#xFF1B;</li>
<li>&#x975E;&#x5FC5;&#x8981;&#x60C5;&#x51B5;&#x4E0B;&#xFF0C;&#x4F7F;&#x7528;<code>read commited</code>&#x4F5C;&#x4E3A;&#x4E8B;&#x52A1;&#x9694;&#x79BB;&#x7EA7;&#x522B;&#xFF0C;&#x907F;&#x514D;&#x6279;&#x91CF;&#x5199;&#x5165;&#x4E0A;&#x9501;&#x800C;&#x4EA7;&#x751F;&#x7684;&#x6027;&#x80FD;&#x95EE;&#x9898;&#xFF1B;<ol>
<li>&#x8D26;&#x6237;&#x7C7B;&#x6570;&#x636E;&#x8868;&#x5E94;&#x8BE5;&#x540C;&#x65F6;&#x8BB0;&#x5F55;&#x64CD;&#x4F5C;&#x8BA2;&#x5355;</li>
</ol>
</li>
</ol>
<h1 id="&#x6570;&#x636E;&#x8868;&#x8BBE;&#x8BA1;&#x5206;&#x7C7B;">&#x6570;&#x636E;&#x8868;&#x8BBE;&#x8BA1;&#x5206;&#x7C7B;</h1>
<h2 id="&#x5355;&#x884C;&#x6574;&#x4F53;&#x7C7B;">&#x5355;&#x884C;&#x6574;&#x4F53;&#x7C7B;</h2>
<p>&#x987E;&#x540D;&#x601D;&#x4E49;&#xFF0C;&#x5355;&#x884C;&#x4E3A;&#x4E00;&#x4E2A;&#x6574;&#x4F53;&#x7684;&#x8868;&#xFF0C;&#x65B0;&#x589E;&#x3001;&#x66F4;&#x65B0;&#x3001;&#x5220;&#x9664;&#x90FD;&#x9488;&#x5BF9;&#x5355;&#x4E00;&#x884C;&#x64CD;&#x4F5C;&#xFF0C;&#x5E38;&#x89C4;&#x60C5;&#x51B5;&#x4E0B;&#xFF0C;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;version&#x4E50;&#x89C2;&#x9501;+&#x6570;&#x636E;&#x5E93;X&#x9501;&#x7684;&#x7EC4;&#x5408;&#xFF0C;&#x5B9E;&#x73B0;&#x4E32;&#x884C;&#x5316;</p>
<p>&#x4E3E;&#x4F8B;&#xFF1A;&#x8D60;&#x5238;&#x8868;coupon&#xFF0C;&#x5F53;&#x884C;&#x4E3A;&#x4E00;&#x5F20;&#x8D60;&#x5238;&#xFF0C;&#x5F53;&#x7528;&#x6237;&#x5728;&#x4E34;&#x8FD1;&#x8FC7;&#x671F;&#x65F6;&#x4F7F;&#x7528;&#x8D60;&#x5238;&#x65F6;&#x7684;&#x5E76;&#x53D1;&#x903B;&#x8F91;&#xFF1A;</p>
<table>
<thead>
<tr>
<th>&#x64CD;&#x4F5C;A</th>
<th>&#x7528;&#x6237;&#x7528;&#x5238;</th>
<th>&#x64CD;&#x4F5C;B</th>
<th>&#x7CFB;&#x7EDF;&#x4F5C;&#x5E9F;&#x8FC7;&#x671F;&#x8D60;&#x5238;</th>
</tr>
</thead>
<tbody>
<tr>
<td>&#x67E5;&#x8BE2;&#x53EF;&#x7528;&#x8D60;&#x5238;</td>
<td>select  {version} from coupon where id = 1</td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td>&#x67E5;&#x8BE2;&#x8FC7;&#x671F;&#x7684;&#x5238;</td>
<td>select {version} from coupon where expire</td>
</tr>
<tr>
<td>&#x4F7F;&#x7528;</td>
<td>update set state = &#x5DF2;&#x4F7F;&#x7528; where version = {version}</td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td>&#x4F5C;&#x5E9F;</td>
<td>update set state = &#x4F5C;&#x5E9F; where version = {version}</td>
</tr>
<tr>
<td>&#x63D0;&#x4EA4;</td>
<td>commit</td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td>&#x56DE;&#x6EDA;</td>
<td>&#x5F53;&#x64CD;&#x4F5C;A&#x5DF2;&#x63D0;&#x4EA4;&#xFF1A;&#x89E6;&#x53D1;&#x4E50;&#x89C2;&#x9501;&#xFF1B;&#x5F53;&#x64CD;&#x4F5C;B&#x672A;&#x63D0;&#x4EA4;&#xFF1A;&#x89E6;&#x53D1;&#x6392;&#x4ED6;&#x9501;</td>
</tr>
</tbody>
</table>
<h2 id="&#x8D26;&#x6237;&#x4E0E;&#x8BA2;&#x5355;&#x7C7B;">&#x8D26;&#x6237;&#x4E0E;&#x8BA2;&#x5355;&#x7C7B;</h2>
<p>&#x5355;&#x884C;&#x6570;&#x636E;&#x975E;&#x5355;&#x4E00;&#x6574;&#x4F53;&#xFF0C;&#x4F8B;&#x5982;</p>
<ul>
<li>&#x73B0;&#x91D1;&#x8D26;&#x6237;&#x8868;</li>
<li>&#x673A;&#x4F1A;&#x8D26;&#x6237;&#x8868;</li>
<li>&#x79EF;&#x5206;&#x8D26;&#x6237;&#x8868;</li>
</ul>
<p>&#x64CD;&#x4F5C;&#x6B64;&#x7C7B;&#x76EE;&#x6570;&#x636E;&#xFF0C;&#x901A;&#x5E38;&#x8981;&#x6C42;&#x540C;&#x65F6;&#x8BBE;&#x8BA1;&#x5173;&#x8054;&#x8BA2;&#x5355;&#x8868;&#xFF0C;&#x4F8B;&#x5982;&#x5411;&#x73B0;&#x91D1;&#x8D26;&#x6237;&#x8868;&#x589E;&#x52A0;&#x6536;&#x5165;&#x6216;&#x652F;&#x51FA;&#xFF0C;&#x9700;&#x8981;&#x8BB0;&#x5F55;&#x6BCF;&#x7B14;&#x6536;&#x5165;&#x652F;&#x51FA;&#x7684;&#x8BA2;&#x5355;&#x8BB0;&#x5F55;&#x3002;</p>
<p><img src="assets/1570671703852.png" alt="1570671703852"></p>
<p>&#x73B0;&#x91D1;&#x8D26;&#x6237;&#x8868;account&#x793A;&#x4F8B;</p>
<table>
<thead>
<tr>
<th>id</th>
<th>&#x7528;&#x6237;id</th>
<th>&#x4F59;&#x989D;</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>101</td>
<td>120.00</td>
</tr>
<tr>
<td>2</td>
<td>102</td>
<td>250.00</td>
</tr>
</tbody>
</table>
<p>&#x8BA2;&#x5355;&#x8868;cash_order&#x793A;&#x4F8B;</p>
<table>
<thead>
<tr>
<th>id</th>
<th>&#x7528;&#x6237;id</th>
<th>&#x91D1;&#x989D;</th>
<th>&#x64CD;&#x4F5C;&#x7C7B;&#x578B;</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>101</td>
<td>+150.00</td>
<td></td>
</tr>
<tr>
<td>2</td>
<td>101</td>
<td>-30.00</td>
<td>&#x63D0;&#x73B0;</td>
</tr>
<tr>
<td>3</td>
<td>120</td>
<td>+20</td>
</tr>
</tbody>
</table>
<p>&#x8BBE;&#x8BA1;&#x539F;&#x5219;&#x662F;</p>
<ol>
<li>&#x8D26;&#x6237;&#x4E0E;&#x8BA2;&#x5355;<strong>&#x4EFB;&#x4F55;</strong>&#x64CD;&#x4F5C;&#x5FC5;&#x987B;&#x4FDD;&#x8BC1;&#x539F;&#x5B50;&#x6027;</li>
<li>&#x6BCF;&#x7B14;&#x64CD;&#x4F5C;&#x90FD;&#x8981;&#x4EE5;&#x8D26;&#x6237;&#x4E3A;&#x5355;&#x4F4D;&#xFF0C;<strong>&#x4EE5;&#x8D26;&#x6237;&#x7684;&#x884C;&#x8BB0;&#x5F55;&#x4F5C;&#x4E32;&#x884C;&#x5316;</strong>&#xFF0C;&#x5373;&#x9488;&#x5BF9;&#x540C;&#x4E00;&#x4E2A;&#x8D26;&#x6237;&#x53EA;&#x80FD;&#x540C;&#x65F6;&#x6267;&#x884C;&#x4E00;&#x4E2A;&#x64CD;&#x4F5C;</li>
<li>&#x5148;&#x64CD;&#x4F5C;&#x8D26;&#x6237;&#x8868;&#x518D;&#x64CD;&#x4F5C;&#x8BA2;&#x5355;</li>
<li>OLTP&#x5E94;&#x7528;&#x4E0D;&#x80FD;&#x901A;&#x8FC7;&#x8303;&#x56F4;&#x67E5;&#x8BE2;&#x3001;&#x805A;&#x5408;&#x67E5;&#x8BE2;&#x8BA2;&#x5355;&#x8868;&#xFF0C;&#x4F8B;&#x5982;&#xFF0C;&#x5B9E;&#x65F6;&#x7EDF;&#x8BA1;&#x7528;&#x6237;&#x6307;&#x5B9A;&#x65F6;&#x95F4;&#x8303;&#x56F4;&#x5185;&#x63D0;&#x73B0;&#x91D1;&#x989D;</li>
</ol>
<h2 id="&#x8D26;&#x6237;&#x90E8;&#x5206;&#x8FC7;&#x671F;&#x7C7B;">&#x8D26;&#x6237;&#x90E8;&#x5206;&#x8FC7;&#x671F;&#x7C7B;</h2>
<p>&#x4E3E;&#x4F8B;&#x4E1A;&#x52A1;&#x573A;&#x666F;&#xFF0C;&#x4F8B;&#x5982;&#x73B0;&#x91D1;&#x8D26;&#x6237;&#x8868;&#x4E2D;&#xFF0C;&#x90E8;&#x5206;&#x8D60;&#x4E88;&#x73B0;&#x91D1;&#xFF0C;&#x8981;&#x6C42;&#x7528;&#x6237;&#x9650;&#x5B9A;&#x65F6;&#x95F4;&#x5185;&#x63D0;&#x73B0;&#xFF0C;&#x5426;&#x5219;&#x8FC7;&#x671F;&#x3002;</p>
<p>&#x5982;&#x679C;&#x6309;&#x7167;&#x6B63;&#x5E38;&#x7684;&#x8BBE;&#x8BA1;&#x601D;&#x8DEF;&#xFF0C;&#x6709;&#x4E24;&#x79CD;&#x601D;&#x8DEF;&#xFF1A;</p>
<ol>
<li><p>&#x6BCF;&#x5929;&#x8DD1;&#x6279;&#xFF0C;&#x5B9A;&#x65F6;&#x626B;&#x63CF;&#x8D26;&#x6237;&#xFF0C;&#x66F4;&#x65B0;&#x8FC7;&#x671F;&#x91D1;&#x989D;&#xFF1B;&#x4F46;&#x663E;&#x7136;&#x8FD9;&#x4E0D;&#x884C;&#xFF0C;&#x6570;&#x636E;&#x91CF;&#x5927;&#xFF0C;&#x8DD1;&#x6279;&#x6162;&#xFF0C;&#x800C;&#x4E14;&#x4E0D;&#x80FD;&#x4FDD;&#x8BC1;&#x6570;&#x636E;&#x53EF;&#x9760;&#x6027;&#xFF1B;</p>
</li>
<li><p>&#x8BA2;&#x5355;&#x8868;&#x589E;&#x52A0;&#x6BCF;&#x6B21;&#x589E;&#x52A0;&#x91D1;&#x989D;&#x65F6;&#xFF0C;&#x8BE5;&#x7B14;&#x91D1;&#x989D;&#x7684;&#x8FC7;&#x671F;&#x65F6;&#x95F4;&#xFF1B;&#x6BCF;&#x5F53;&#x7528;&#x6237;&#x53D1;&#x751F;&#x64CD;&#x4F5C;&#x65F6;&#xFF0C;&#x91CD;&#x65B0;&#x7EDF;&#x8BA1;&#x7528;&#x6237;&#x7684;&#x4F59;&#x989D;&#xFF1B;&#x4F46;&#x8FD9;&#x4E0D;&#x7B26;&#x5408;&#x524D;&#x9762;&#x8BBE;&#x8BA1;&#x539F;&#x5219;&#x7684;&#x7B2C;3&#x3001;&#x7B2C;4&#x539F;&#x5219;</p>
</li>
</ol>
<p>&#x7B2C;3&#x79CD;&#x8BBE;&#x8BA1;&#x601D;&#x8DEF;&#x662F;&#xFF0C;&#x6309;&#x7167;&#x524D;&#x9762;4&#x6761;&#x8BBE;&#x8BA1;&#x539F;&#x5219;&#xFF0C;&#x8D26;&#x6237;&#x8868;account&#x589E;&#x52A0;<strong>&#x3010;&#x6700;&#x8FD1;&#x8FC7;&#x671F;&#x65F6;&#x95F4;&#x3011;</strong>&#x5B57;&#x6BB5;&#xFF0C;&#x53D1;&#x751F;&#x76F8;&#x5173;&#x64CD;&#x4F5C;&#x524D;&#x90FD;&#x533A;&#x5206;<strong>&#x6709;&#x8FC7;&#x671F;</strong>&#x8DDF;<strong>&#x6CA1;&#x6709;&#x8FC7;&#x671F;</strong>&#x7684;&#x4E24;&#x79CD;&#x60C5;&#x51B5;</p>
<p><strong>&#x8D26;&#x6237;&#x8868;</strong></p>
<table>
<thead>
<tr>
<th>id</th>
<th>&#x7528;&#x6237;id</th>
<th>&#x4F59;&#x989D;</th>
<th>&#x6700;&#x8FD1;&#x8FC7;&#x671F;&#x65F6;&#x95F4;</th>
<th>&#x7248;&#x672C;</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>101</td>
<td>120.00</td>
<td>2018-10-20</td>
<td>3</td>
</tr>
<tr>
<td>2</td>
<td>102</td>
<td>250.00</td>
<td>2018-10-21</td>
<td>4</td>
</tr>
</tbody>
</table>
<p><strong>&#x8BA2;&#x5355;&#x8868;</strong></p>
<table>
<thead>
<tr>
<th>id</th>
<th>&#x7528;&#x6237;id</th>
<th>&#x91D1;&#x989D;</th>
<th>&#x64CD;&#x4F5C;&#x7C7B;&#x578B;</th>
<th>&#x8FC7;&#x671F;&#x65F6;&#x95F4;</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>101</td>
<td>+150.00</td>
<td>&#x589E;&#x52A0;</td>
<td>2018-10-20</td>
</tr>
<tr>
<td>2</td>
<td>101</td>
<td>-30.00</td>
<td>&#x63D0;&#x73B0;</td>
<td>null</td>
</tr>
<tr>
<td>3</td>
<td>120</td>
<td>+20</td>
<td>&#x589E;&#x52A0;</td>
<td>2018-10-21</td>
</tr>
</tbody>
</table>
<p><strong>&#x4EE3;&#x7801;&#x903B;&#x8F91;</strong>&#xFF0C;&#x4F8B;&#x5982;<strong>&#x63D0;&#x73B0;</strong></p>
<pre><code class="lang-sql">select @account from account where &#x7528;&#x6237; = 1;

if(@account.&#x6700;&#x8FD1;&#x8FC7;&#x671F;&#x65F6;&#x95F4; &#x8FD8;&#x6CA1;&#x5230;){
   #&#x8D26;&#x6237;&#x7684;&#x94B1;&#x90FD;&#x80FD;&#x7528;&#xFF0C;&#x7EE7;&#x7EED;&#x5176;&#x4ED6;&#x4E1A;&#x52A1;&#x64CD;&#x4F5C;
}else(&#x5230;&#x4E86;){
   #&#x8D26;&#x6237;&#x7684;&#x94B1;&#xFF0C;&#x6709;&#x90E8;&#x5206;&#x8FC7;&#x671F;

   #&#x91CD;&#x65B0;&#x901A;&#x8FC7;&#x8BA2;&#x5355;&#x8868;&#x7EDF;&#x8BA1;&#x4F59;&#x989D;
   select sum(&#x4F59;&#x989D;), @&#x65B0;&#x6700;&#x8FD1;&#x8FC7;&#x671F;&#x65F6;&#x95F4; from cash_order where &#x7528;&#x6237; = 1 and &#x6CA1;&#x8FC7;&#x671F;&#x7684; and &#x64CD;&#x4F5C;&#x7C7B;&#x578B;&#x4E3A;&#x589E;&#x52A0;

   #&#x66F4;&#x65B0;&#x8D26;&#x6237;&#x8868;
   update account set sum(&#x4F59;&#x989D;), @&#x65B0;&#x6700;&#x8FD1;&#x8FC7;&#x671F;&#x65F6;&#x95F4; where &#x7248;&#x672C;&lt;= @account.&#x7248;&#x672C; 

   #&#x7EE7;&#x7EED;&#x5176;&#x4ED6;&#x4E1A;&#x52A1;&#x64CD;&#x4F5C;
}
</code></pre>
<p>&#x76EE;&#x6807;&#x5C31;&#x662F;&#x5C3D;&#x91CF;&#x51CF;&#x5C11;&#x805A;&#x5408;&#x7EDF;&#x8BA1;&#xFF0C;&#x6839;&#x636E;&#x4E0D;&#x540C;&#x7684;&#x4E1A;&#x52A1;&#x7684;&#x60C5;&#x51B5;&#xFF0C;&#x53EF;&#x4EE5;&#x589E;&#x52A0;&#x524D;&#x7F6E;&#x7F13;&#x5B58;&#x6821;&#x9A8C;&#xFF0C;&#x4F46;&#x8D26;&#x6237;&#x4F59;&#x989D;&#x7684;&#x7EDF;&#x8BA1;&#xFF0C;&#x5FC5;&#x987B;&#x4EE5;&#x8BA2;&#x5355;&#x8868;&#x7684;&#x7EDF;&#x8BA1;&#x4E3A;&#x51C6;&#x3002;</p>
<h2 id="&#x5B50;&#x8BA2;&#x5355;&#x7C7B;">&#x5B50;&#x8BA2;&#x5355;&#x7C7B;</h2>
<p>TODO</p>
<h2 id="&#x5173;&#x7CFB;&#x6620;&#x5C04;&#x7C7B;">&#x5173;&#x7CFB;&#x6620;&#x5C04;&#x7C7B;</h2>
<p>&#x4E00;&#x5BF9;&#x591A;</p>
<p>&#x4F8B;&#x5982;&#xFF1A;&#x9080;&#x8BF7;&#x5173;&#x7CFB;&#x8868;&#x3001;&#x62FC;&#x56E2;&#x56E2;&#x961F;</p>
<p>TODO</p>
<h2 id="&#x6807;&#x7B7E;&#x7C7B;">&#x6807;&#x7B7E;&#x7C7B;</h2>
<p>&#x4F8B;&#x5982;&#xFF1A;&#x6587;&#x7AE0;&#x8868;article&#x4E0E;&#x6807;&#x7B7E;&#x8868;article_category&#xFF0C;&#x4E00;&#x904D;&#x6587;&#x7AE0;&#x53EF;&#x80FD;&#x6709;&#x591A;&#x4E2A;&#x6807;&#x7B7E;&#xFF0C;&#x67E5;&#x8BE2;&#x9700;&#x6C42;&#x662F;&#xFF0C;&#x67E5;&#x8BE2;&#x540C;&#x65F6;&#x5177;&#x6709;X&#x3001;Y&#x6807;&#x7B7E;&#x7684;&#x6587;&#x7AE0;&#x5217;&#x8868;</p>
<p><strong>article</strong></p>
<table>
<thead>
<tr>
<th>id</th>
<th>&#x5185;&#x5BB9;</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>&#x66FC;&#x57CE;&#x8D62;&#x7403;</td>
</tr>
<tr>
<td>2</td>
<td>&#x5207;&#x5C14;&#x897F;&#x7206;&#x51B7;&#x5E73;&#x5C40;</td>
</tr>
</tbody>
</table>
<p><strong>article_category</strong></p>
<table>
<thead>
<tr>
<th>id</th>
<th>article_id</th>
<th>name</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>101</td>
<td>nba</td>
</tr>
<tr>
<td>2</td>
<td>101</td>
<td>&#x82F1;&#x8D85;</td>
</tr>
<tr>
<td>3</td>
<td>120</td>
<td>&#x897F;&#x7532;</td>
</tr>
</tbody>
</table>
<p>TODO&#x56FE;&#x6570;&#x636E;&#x5E93;neo4j</p>
<h2 id="&#x5E42;&#x7B49;&#x63A5;&#x53E3;&#x8BA2;&#x5355;&#x8BBE;&#x8BA1;">&#x5E42;&#x7B49;&#x63A5;&#x53E3;&#x8BA2;&#x5355;&#x8BBE;&#x8BA1;</h2>
<p>TODO</p>
<footer class="page-footer"><span class="copyright">Copyright &#xA9; tgor.top 2019 all right reserved&#xFF0C;powered by Gitbook</span><span class="footer-modification">&#x8BE5;&#x6587;&#x4EF6;&#x4FEE;&#x8BA2;&#x65F6;&#x95F4;&#xFF1A;
2020-04-23 15:32:53
</span></footer>
<script>console.log("plugin-popup....");document.onclick = function(e){ e.target.tagName === "IMG" && window.open(e.target.src,e.target.src)}</script><style>img{cursor:pointer}</style>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="../category/数据库.html" class="navigation navigation-prev " aria-label="Previous page: 数据库">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="Mysql事务与锁.html" class="navigation navigation-next " aria-label="Next page: mysql事务与锁">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"mysql设计","level":"1.3.1","depth":2,"next":{"title":"mysql事务与锁","level":"1.3.2","depth":2,"path":"Mysql/Mysql事务与锁.md","ref":"Mysql/Mysql事务与锁.md","articles":[]},"previous":{"title":"数据库","level":"1.3","depth":1,"path":"category/数据库.md","ref":"category/数据库.md","articles":[{"title":"mysql设计","level":"1.3.1","depth":2,"path":"Mysql/经典数据库设计案例.md","ref":"Mysql/经典数据库设计案例.md","articles":[]},{"title":"mysql事务与锁","level":"1.3.2","depth":2,"path":"Mysql/Mysql事务与锁.md","ref":"Mysql/Mysql事务与锁.md","articles":[]},{"title":"mysql数据类型","level":"1.3.3","depth":2,"path":"Mysql/mysql数据类型.md","ref":"Mysql/mysql数据类型.md","articles":[]},{"title":"mysql索引与查询","level":"1.3.4","depth":2,"path":"Mysql/mysql索引及查询.md","ref":"Mysql/mysql索引及查询.md","articles":[]},{"title":"mysql查询语句设计准则","level":"1.3.5","depth":2,"anchor":"#查询语句设计准则","path":"Mysql/mysql索引及查询.md","ref":"Mysql/mysql索引及查询.md#查询语句设计准则","articles":[]},{"title":"mysql性能测试","level":"1.3.6","depth":2,"path":"Mysql/mysql性能测试.md","ref":"Mysql/mysql性能测试.md","articles":[]},{"title":"mysql主从同步与读写分离","level":"1.3.7","depth":2,"path":"Mysql/mysql主从同步与读写分离.md","ref":"Mysql/mysql主从同步与读写分离.md","articles":[]},{"title":"Spring事务注解@Transactional","level":"1.3.8","depth":2,"path":"Java-Spring/SpringBoot事务注解@Transactional.md","ref":"Java-Spring/SpringBoot事务注解@Transactional.md","articles":[]},{"title":"位运算应用实例","level":"1.3.9","depth":2,"path":"数据结构与算法/位运算应用实例.md","ref":"数据结构与算法/位运算应用实例.md","articles":[]},{"title":"morphia API汇总","level":"1.3.10","depth":2,"path":"Mongodb-Client/morphia-API汇总.md","ref":"Mongodb-Client/morphia-API汇总.md","articles":[]},{"title":"mongodb驱动与连接","level":"1.3.11","depth":2,"path":"Mongodb-Client/mongo驱动连接.md","ref":"Mongodb-Client/mongo驱动连接.md","articles":[]},{"title":"mongodb ObjectId实践","level":"1.3.12","depth":2,"path":"Mongodb/mongodb-ObjectId实践.md","ref":"Mongodb/mongodb-ObjectId实践.md","articles":[]},{"title":"mongodb角色权限","level":"1.3.13","depth":2,"path":"Mongodb/mongodb角色权限.md","ref":"Mongodb/mongodb角色权限.md","articles":[]}]},"dir":"ltr"},"config":{"plugins":["chapter-fold","splitter","tbfed-pagefooter","page-toc-button","-search","search-pro","popup","back-to-top-button","code","copy-code-button"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"tbfed-pagefooter":{"copyright":"Copyright &copy tgor.top 2019","modify_label":"该文件修订时间：","modify_format":"YYYY-MM-DD HH:mm:ss"},"chapter-fold":{},"splitter":{},"search-pro":{"cutWordLib":"nodejieba","defineWord":["Gitbook Use"]},"popup":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"code":{"copyButtons":true},"fontsettings":{"theme":"sepia","family":"serif","size":1},"highlight":{},"page-toc-button":{"maxTocDepth":2,"minTocSize":2},"back-to-top-button":{},"copy-code-button":{},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","author":"tgor","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"tgor note","gitbook":"*","description":"tgor生活工作记录"},"file":{"path":"Mysql/经典数据库设计案例.md","mtime":"2020-04-23T07:32:53.362Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2020-04-29T08:43:24.127Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-page-toc-button/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/jquery.mark.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-back-to-top-button/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-copy-code-button/toggle.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

